Optimal. Leaf size=84 \[ \frac {i (c+d x)}{2 f (a+i a \tan (e+f x))}+\frac {(c+d x)^2}{4 a d}+\frac {d}{4 f^2 (a+i a \tan (e+f x))}-\frac {i d x}{4 a f} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.05, antiderivative size = 84, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {3723, 3479, 8} \[ \frac {i (c+d x)}{2 f (a+i a \tan (e+f x))}+\frac {(c+d x)^2}{4 a d}+\frac {d}{4 f^2 (a+i a \tan (e+f x))}-\frac {i d x}{4 a f} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 3479
Rule 3723
Rubi steps
\begin {align*} \int \frac {c+d x}{a+i a \tan (e+f x)} \, dx &=\frac {(c+d x)^2}{4 a d}+\frac {i (c+d x)}{2 f (a+i a \tan (e+f x))}-\frac {(i d) \int \frac {1}{a+i a \tan (e+f x)} \, dx}{2 f}\\ &=\frac {(c+d x)^2}{4 a d}+\frac {d}{4 f^2 (a+i a \tan (e+f x))}+\frac {i (c+d x)}{2 f (a+i a \tan (e+f x))}-\frac {(i d) \int 1 \, dx}{4 a f}\\ &=-\frac {i d x}{4 a f}+\frac {(c+d x)^2}{4 a d}+\frac {d}{4 f^2 (a+i a \tan (e+f x))}+\frac {i (c+d x)}{2 f (a+i a \tan (e+f x))}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.44, size = 96, normalized size = 1.14 \[ \frac {\left (2 c f (2 f x-i)+d \left (2 f^2 x^2-2 i f x-1\right )\right ) \tan (e+f x)-i \left (2 c f (2 f x+i)+d \left (2 f^2 x^2+2 i f x+1\right )\right )}{8 a f^2 (\tan (e+f x)-i)} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.52, size = 55, normalized size = 0.65 \[ \frac {{\left (2 i \, d f x + 2 i \, c f + 2 \, {\left (d f^{2} x^{2} + 2 \, c f^{2} x\right )} e^{\left (2 i \, f x + 2 i \, e\right )} + d\right )} e^{\left (-2 i \, f x - 2 i \, e\right )}}{8 \, a f^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.70, size = 65, normalized size = 0.77 \[ \frac {{\left (2 \, d f^{2} x^{2} e^{\left (2 i \, f x + 2 i \, e\right )} + 4 \, c f^{2} x e^{\left (2 i \, f x + 2 i \, e\right )} + 2 i \, d f x + 2 i \, c f + d\right )} e^{\left (-2 i \, f x - 2 i \, e\right )}}{8 \, a f^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 0.56, size = 187, normalized size = 2.23 \[ \frac {-\frac {i d \left (-\frac {\left (f x +e \right ) \left (\cos ^{2}\left (f x +e \right )\right )}{2}+\frac {\sin \left (f x +e \right ) \cos \left (f x +e \right )}{4}+\frac {f x}{4}+\frac {e}{4}\right )}{f}+\frac {i c \left (\cos ^{2}\left (f x +e \right )\right )}{2}-\frac {i d e \left (\cos ^{2}\left (f x +e \right )\right )}{2 f}+\frac {d \left (\left (f x +e \right ) \left (\frac {\sin \left (f x +e \right ) \cos \left (f x +e \right )}{2}+\frac {f x}{2}+\frac {e}{2}\right )-\frac {\left (f x +e \right )^{2}}{4}-\frac {\left (\sin ^{2}\left (f x +e \right )\right )}{4}\right )}{f}+c \left (\frac {\sin \left (f x +e \right ) \cos \left (f x +e \right )}{2}+\frac {f x}{2}+\frac {e}{2}\right )-\frac {d e \left (\frac {\sin \left (f x +e \right ) \cos \left (f x +e \right )}{2}+\frac {f x}{2}+\frac {e}{2}\right )}{f}}{a f} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F(-2)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: RuntimeError} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 2.81, size = 105, normalized size = 1.25 \[ \frac {d\,\cos \left (2\,e+2\,f\,x\right )+2\,d\,f^2\,x^2+2\,c\,f\,\sin \left (2\,e+2\,f\,x\right )+4\,c\,f^2\,x+2\,d\,f\,x\,\sin \left (2\,e+2\,f\,x\right )-d\,\sin \left (2\,e+2\,f\,x\right )\,1{}\mathrm {i}+c\,f\,\cos \left (2\,e+2\,f\,x\right )\,2{}\mathrm {i}+d\,f\,x\,\cos \left (2\,e+2\,f\,x\right )\,2{}\mathrm {i}}{8\,a\,f^2} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.24, size = 97, normalized size = 1.15 \[ \begin {cases} - \frac {\left (- 2 i c f - 2 i d f x - d\right ) e^{- 2 i e} e^{- 2 i f x}}{8 a f^{2}} & \text {for}\: 8 a f^{2} e^{2 i e} \neq 0 \\\frac {c x e^{- 2 i e}}{2 a} + \frac {d x^{2} e^{- 2 i e}}{4 a} & \text {otherwise} \end {cases} + \frac {c x}{2 a} + \frac {d x^{2}}{4 a} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________